using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using QuanLyKhachSan.BUS;
using QuanLyKhachSan.DTO;

namespace QuanLyKhachSan.DAO
{
    public class ChiTietHoaDonDAO
    {
        public static DataTable LayDSChiTietHoaDon(int maHoaDon)
        {
            DataTable dt = new DataTable();
            return dt;
        }

        public static bool Insert(ChiTietHoaDonDTO chiTietHoaDondto)
        {
            int kq;
            DataAccessHelper con = new SqlDataAccessHelper();
            string sql = "INSERT INTO ChiTietHoaDon(maHoaDon,maPhieuThue,soNgayThue,donGia) VALUES (" + chiTietHoaDondto.MaHoaDon + "," + chiTietHoaDondto.MaPhieuThue + "," + chiTietHoaDondto.SoNgayThue + "," + chiTietHoaDondto.DonGia + ")";
            kq = con.ExecuteNonQuery1(sql);
            if (kq > 0)
            {
                return true;
            }
            return false;
        }
    }
}
